<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
	<head>
		<meta charset="utf-8" />
		<meta name="viewport" content="width=device-width, initial-scale=1">
		<meta name="description" th:content="${food.description}">
		<title th:text="${food.title}"></title>
		<link rel="stylesheet" th:href="@{/libs/bootstrap/bootstrap.min.css}"/>
		<link rel="stylesheet" th:href="@{/libs/font-icon/icon.css}"/>
		<link rel="stylesheet" th:href="@{/libs/markdown/simplemde.min.css}">
		<link rel="stylesheet" th:href="@{/libs/markdown/github-markdown.min.css}">
		<link rel="stylesheet" th:href="@{/libs/markdown/highlight.min.css}">
		<link rel="stylesheet" th:href="@{/libs/theme/pblog/css/web-common.css}" />
		<link rel="stylesheet" th:href="@{/libs/theme/pblog/css/web-blog.css}" />
		<script th:inline="javascript">var ctx = [[@{/}]];</script>
		<script th:src="@{/js/jquery.min.js}"></script>
		<script th:src="@{/libs/bootstrap/bootstrap.min.js}"></script>
		<script th:src="@{/libs/markdown/highlight.min.js}"></script>
		<script th:src="@{/libs/markdown/simplemde.min.js}"></script>
		<script th:src="@{/libs/layer/layer.js}"></script>
		<script th:src="@{/js/hc-sticky.js}"></script>
		<script th:src="@{/js/core.js}"></script>
		<script th:src="@{/libs/theme/pblog/js/pb-blog.js}"></script>
	</head>
	<body>
		<header id="header">
			<div th:replace="home/fragments/navbar :: navbar"></div>
		</header>
		<div class="pb-container pb-content">
			<div class="pb-main">
				<div class="article-main">
					<h3 th:text="${food.title}" class="article-title"></h3>
					<div class="article-meta">发布于 <span th:text="${#dates.format(food.createTime,'yyyy-MM-dd')}"></span> &nbsp;|&nbsp; <span th:text="${article.bizCategory.name}"></span> &nbsp;|&nbsp; 浏览（<span th:text="${article.lookCount}? ${article.lookCount} : 0"></span>） &nbsp;|&nbsp; 评论（<span th:text="${article.commentCount}? ${article.commentCount} : 0"></span>）</div>
					<hr class="hr0" />
					<div th:utext="${food.content}" class="article-body markdown-body editor-preview-active-side">
					</div>
					<!--<div class="article-zan-shang">
						<span class="article-zan"><i class="fa fa-thumbs-o-up"></i>点赞</span> <span>打赏</span>
					</div>-->
				</div>
				<!--<div th:if="${food.comment==1}" id="comment" class="comment comment-main">-->
					<!--<div class="comment-title">发表评论</div>-->
					<!--<form id="comment-form" class="form-horizontal mt-10">-->
						<!--<input id="foodId" name="sid" type="hidden" th:value="${food.id}">-->
						<!--<div id="user-name-content" class="user-name-content">欢迎您：<b id="user-name"></b></div>-->
						<!--<div class="form-group" id="user-info" style="display: none">-->
							<!--<div class="col-sm-4">-->
								<!--<input id="nickname" type="text" class="form-control"  name="nickname" placeholder="昵称(必填)">-->
							<!--</div>-->
							<!--<div class="col-sm-4">-->
								<!--<input id="qq" type="text" class="form-control"  name="qq" placeholder="QQ（可获取头像和昵称）">-->
							<!--</div>-->
							<!--<div class="col-sm-4">-->
								<!--<input id="email" type="text" class="form-control"  name="email" placeholder="邮箱">-->
							<!--</div>-->
						<!--</div>-->
						<!--<div class="form-group">-->
							<!--<div class="col-xs-12">-->
								<!--<textarea name="content" id="comment-textarea"></textarea>-->
							<!--</div>-->
						<!--</div>-->
						<!--<div><button id="submitCommentBtn" type="button" class="btn btn-pri">发表评论</button></div>-->
					<!--</form>-->
					<!--<hr class="hr0 mt-15"/>-->
					<!--<ul id="comment-ul" class="comment">-->
					<!--</ul>-->
				<!--</div>-->
			</div>
			<div th:replace="home/fragments/sidebar :: sidebar"></div>
		</div>
		<div th:replace="home/fragments/footer :: copyrightDark"></div>
		<div class="return_top"><a class=" fa fa-arrow-up"></a></div>
		<script>
			var sid=[[${article.id}]];
			Core.postAjax("/blog/api/article/look",{"articleId":sid})
			$(function () {
				$(".thumbs-button").click(function () {
                    Core.postAjax("/blog/api/love",{"bizId":sid,"bizType":1},function (data) {
                        if(data.status==200){
                            $("#loveCount").text(parseInt($("#loveCount").text())+1);
                        }
                    });
                })
            })
		</script>
		<script  th:if="${article.comment==1}" th:src="@{/js/comment.js}"></script>
	</body>

</html>